﻿using Nop.Core;
using Nop.Core.Domain.Orders;
using Nop.Core.Domain.Payments;
using System;

namespace Spotshub.Plugin.Payments.GlobalPayments
{
    public class PaymentTransaction : BaseEntity
    {
        /// <summary>
        /// Gets or sets the create time on UTC
        /// </summary>
        public virtual DateTime CreateOnUtc { get; set; }

        /// <summary>
        /// Gets or sets the raw result
        /// </summary>
        public virtual string RawResult { get; set; }

        /// <summary>
        /// Gets or sets the credit card identifier
        /// </summary>
        public virtual int? CreditCardId { get; set; }

        /// <summary>
        /// Gets or sets the transaction amount
        /// </summary>
        public virtual decimal Amount { get; set; }

        /// <summary>
        /// Gets or sets the order identifier
        /// </summary>
        public virtual int? OrderId { get; set; }

        /// <summary>
        /// Gets or sets the payment status identifier
        /// </summary>
        public virtual int PaymentStatusId { get; set; }

        /// <summary>
        /// Gets or sets the credit card
        /// </summary>
        public virtual PaymentCreditCard CreditCard { get; set; }

        /// <summary>
        /// Gets or sets  the UId
        /// </summary>
        public virtual string UId { get; set; }

        /// <summary>
        /// Gets or sets the payment status
        /// </summary>
        public virtual PaymentStatus PaymentStatus
        {
            get
            {
                return (PaymentStatus)this.PaymentStatusId;
            }
            set
            {
                this.PaymentStatusId = (int)value;
            }
        }
    }
}
